﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebClient.ElectricCarService;

namespace WebClient
{
    public partial class Stations : System.Web.UI.Page
    {
        private IElectricCarService _serviceClient = new ElectricCarServiceClient();
        IList<Station> stations = null;

        protected void Page_Load(object sender, EventArgs e)
        {   
        }

        protected override void OnInit(EventArgs e)
        {
            LoadStations();
            base.OnInit(e);
        }

        private void LoadStations()
        {

            stations = _serviceClient.GetAllStations();

            grdStations.DataSource = stations;
            grdStations.DataBind();

        }

        
    }
}